<template>
    <MerchantHeader :key="mainMerchant.id" :mainMerchant="mainMerchant"></MerchantHeader>
    <MerchantOrder :key="mainMerchant.id" :mainMerchant="mainMerchant"></MerchantOrder>
    <MerchantShoppingCart></MerchantShoppingCart>
</template>
<script>
    import MerchantHeader from "../components/MerchantCom/MerchantHeader.vue";
    import MerchantOrder from "../components/MerchantCom/MerchantOrder.vue";
    import MerchantShoppingCart from "../components/MerchantCom/MerchantShoppingCart.vue";
    export default {
        name: "MerchantView",
        components:{
            MerchantHeader,
            MerchantOrder,
            MerchantShoppingCart
        },
        data() {
            return {
                mainMerchant: [],
                merchantId: this.$route.query,
                merchant: this.$store.state.stores
            }
        },

        created() {
            return this.mainMerchant = this.merchant.find(item => item.id == this.$route.query.query)
        }
    }
</script>

<style scoped>

</style>